<div class="content">
    <?php $this->widget('CenterNavWidget'); ?>
    <div class="pull_right content_right">
        <div class="page_title_op">
            <h1 class="page_title pull_left">消息管理</h1>
            <ul class="pull_left options">
                <li><a href="/message/list" class="<?php if(empty(Yii::app()->request->getQuery('type'))){echo 'active';}?>">全部</a></li>
                <?php foreach($type as $k => $v):?>
                    <li>
                        <a href="<?php echo $this->createUrl('message/list',array('type'=>$k))?>" class="<?php if(Yii::app()->request->getQuery('type') == $k){echo 'active';}?>"><?php echo $v?></a>
                    </li>
                <?php endforeach;?>
            </ul>
        </div>
        <div class="table_list_container top_nomargin">
            <!-- 表头 -->
            <div class="table_list receive_send list_head zj_no_margin">
                <table class="receive_send_head">
                    <tr class="receive_send">
                        <th class="rls_number">类型</th>
                        <th class="mine_msg">内容</th>
                        <th class="ord_carrier">时间</th>
                    </tr>
                </table>
            </div>
            <!-- 重复 li 循环-->
            <?php if(!empty($messages)): ?>
                <ul>
                    <li class="table_list word_break receive_send black">
                        <table class="receive_send_body news_info_table">
                            <tbody>
                                <?php foreach($messages as $message):?>
                                    <tr class="receive_send">
                                        <td class="rls_number">
                                            <?php echo $message['type_text']?>
                                        </td>
                                        <td class="mine_msg">
                                            <?php if(!empty($message['url'])):?>
                                                <a href="<?php echo $this->createUrl($message['url'])?>"><?php echo $message['content']?></a>
                                            <?php else:?>
                                                <?php echo $message['content']?>
                                            <?php endif;?>
                                        </td>
                                        <td class="ord_carrier">
                                            <?php echo date('Y-m-d H:i',$message['ctime'])?>
                                        </td>
                                    </tr>
                                <?php endforeach;?>
                            </tbody>
                        </table>
                    </li>
                    <!--异常 error class-->
                </ul>
            <?php endif;?>


        </div>
        <!-- 分页 -->
        <div class="pagenation">
            <?php if(!empty($messages)): ?>
            <?php $this->widget('PagerWidget', array('url'=>'/message/list','pager'=>$pager)); ?>
            <?php endif; ?>
        </div>
    </div>
</div>
